package cn.dj.system.service.impl;

import cn.dj.basic.service.impl.BaseServiceImpl;
import cn.dj.system.domain.SystemDictionaryDetail;
import cn.dj.system.service.SystemDictionaryDetailService;
import org.springframework.stereotype.Service;

/**
 * 业务实现类：数据字典明细
 */
//前提：扫描包路径
@Service //1.将当前类交给Spring管理 = 2.实例化对象注解 = 3.创建对象的注解[这样Spring容器中有该类的对象，才能在其他地方注入该对象]
public class SystemDictionaryDetailServiceImpl extends BaseServiceImpl<SystemDictionaryDetail> implements SystemDictionaryDetailService {
   /* @Autowired
    private EmployeeMapper employeeMapper;

    //增删改用 @Transactional 默认的readOnly = false,propagation = Propagation.REQUIRED
    @Transactional
    @Override
    public void save(Employee employee) {
        employeeMapper.save(employee);
    }
    @Transactional
    @Override
    public void update(Employee employee) {
        employeeMapper.update(employee);
    }
    @Transactional
    @Override
    public void del(Long id) {
        employeeMapper.del(id);
    }

    @Override
    public List<Employee> loadAll() {
        return employeeMapper.loadAll();
    }

    @Override
    public Employee loadById(Long id) {
        return employeeMapper.loadById(id);
    }

    @Override
    public PageList<Employee> queryPage(EmployeeQuery employeeQuery) {
       //1.查询总数量
        Integer totals = employeeMapper.queryCount(employeeQuery);
        if(totals < 1){//没有查询到数据的情况
            return new PageList<>();
        }
        //2.查询当前页的分页数据
        List<Employee> employees = employeeMapper.queryData(employeeQuery);
        return new PageList<>(totals,employees);
    }

    @Override
    public void patchDelete(List<Long> ids) {
        employeeMapper.patchDelete(ids);
    }*/

}
